Refactor unified_qr.rs to use bitcoin-payment-instructions #666
+302
−125
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a continuation of #607 which was closed mistakenly when the
develop
base branch was deleted.This PR introduces a
unified.rs
module (which is a refactor of theunified_qr.rs
module) - this refactor allows us to use this module as a single API for sending payments toBIP 21/321 URIs
as well asBIP 353 HRNs
, creating a simpler interface for users.https://github.com/rust-bitcoin/bitcoin-payment-instructions is used to parse
BIP 21/321 URIs
as well as theBIP 353 HRNs
.Changes
unified_qr.rs
module has been renamed tounified.rs
.UnifiedQrPayment
struct has been renamed toUnifiedPayment
.QRPaymentResult
enum has been renamed toUnifiedPaymentResult
.send
method inunified.rs
now supports sending to bothBIP 21/321 URIs
as well asBIP 353 HRNs
.This PR closes #521